package com.starview.platform.data.type;

import com.starview.star.compiler.util.PrettyPrintable;

/**
 * The specification of a type. This is used in type interfaces to determine the types defined in
 * that interface.
 * 
 * @author fgm
 * 
 */
public interface TypeSpecification extends PrettyPrintable
{
  /**
   * What is the name of this type?
   * 
   * @return
   */
  String getName();

  /**
   * What kind of type is this?
   * 
   * @return
   */
  Kind kind();

  /**
   * A type may be generic, in which case the {@code typeArity} of the type will be greater than
   * zero.
   * 
   * @return the number of type arguments type expressions of this type should have.
   */
  int typeArity();

  /**
   * Return a template of the type that this description defines. If the type is generic, then this
   * function will return a universally quantified type.
   * 
   * @return a template of the type defined by this description.
   */
  IType getType();
}
